﻿ 
using hCommand; 
using System; 

namespace Persistence {
    public   class CsdCsMoveEngine : StockMoveEngine<CoreStock> {
      
        protected override void afterCSMove() {
            CsdUtil.setCSDPLoc(this, id, des);
            //修改库区分类配置不修改原有优先级，库位库区也不修改优先级

            String s = " select  ca.priority from    core_wh_area ca join core_wh_loc l on l.area_Id = ca.id where l.id = @loc  ";
            var p= queryUnique<int>(s, new { loc= des });
            String s1 = "update  core_stock   set area_order = @p  where  id=@id  "; 
            exec(s1, new {  id, p });
        } 
    }
}
